package com.mxpio.erp.common.oa.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_OA_TRAVEL_REIMBURSEMENT_LINE")
@Schema(description="差旅报销单-明细")
public class OaTravelReimbursementLine extends BaseEntity {

    @Id
    @Generator(policy = UUIDPolicy.class)
    @Column(name = "ID_")
    @Schema(description = "主键")
    private String id;

    @Column(name = "BIZ_NO_", updatable = false)
    @Schema(description = "差旅报销单编号")
    private String bizNo;

    @Column(name = "START_TIME_")
    @Schema(description = "开始时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date startTime;

    @Column(name = "END_TIME_")
    @Schema(description = "结束时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date endTime;

    @Column(name = "DEPARTURE_")
    @Schema(description = "出发地")
    private String departure;

    @Column(name = "DESTINATION_")
    @Schema(description = "目的地")
    private String destination;

    @Column(name = "DAYS_")
    @Schema(description = "天数")
    private Integer days;

    @Column(name = "CAR_COST_")
    @Schema(description = "汽车")
    private BigDecimal carCost;

    @Column(name = "TRAIN_COST_")
    @Schema(description = "火车")
    private BigDecimal trainCost;

    @Column(name = "SHIP_COST_")
    @Schema(description = "轮船")
    private BigDecimal shipCost;

    @Column(name = "PLANE_COST_")
    @Schema(description = "飞机")
    private BigDecimal planeCost;

    @Column(name = "LODGING_COST_")
    @Schema(description = "住宿费")
    private BigDecimal lodgingCost;

    @Column(name = "FOOD_ALLOWANCE_")
    @Schema(description = "膳食补贴")
    private BigDecimal foodAllowance;

    @Column(name = "OTHER_EXPENSES_")
    @Schema(description = "其他费用")
    private BigDecimal otherExpenses;

    @Column(name = "TOTAL_COST_")
    @Schema(description = "合计费用")
    private BigDecimal totalCost;

    @Column(name = "PIC_")
    @Schema(description = "图片")
    private String pic;
}
